# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=aspell-fr
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.50
pkgrel=1
pkgdesc="French dictionary for aspell (mingw-w64)"
arch=('any')
url="http://aspell.net/"
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-aspell")
source=(https://ftp.gnu.org/gnu/aspell/dict/fr/aspell-fr-${pkgver}-3.tar.bz2
        001-unixy-dirs.patch)
sha256sums=('f9421047519d2af9a7a466e4336f6e6ea55206b356cd33c8bd18cb626bf2ce91'
            '86f8671c97d27b24656d22edc215e75b8cab32733967f86bfc57b6680d2fdee5')

prepare() {
  cd "${srcdir}/aspell-fr-${pkgver}-3"
  patch -p1 -i ${srcdir}/001-unixy-dirs.patch
}

build() {
  cd "${srcdir}/aspell-fr-${pkgver}-3"
  ./configure
  sed -i 's/C\:\\msys64\\/\//' Makefile
  make
}

package() {
  cd "${srcdir}/aspell-fr-${pkgver}-3"
  make DESTDIR="${pkgdir}" install

  install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
